<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>鼠标经过切换图片</title>
</head>
<body>
<img src="images/jd1.png" alt="" id="pic">
</body>
<script>
    var pic = document.getElementById("pic");
    pic.onmouseover = function(){
        pic.src = "images/jd2.png";
    }
    pic.onmouseout = function(){
        pic.src = "images/jd1.png";
    }
</script>
</html>